The present invention relates to an oscillator suitable for use in an integrated circuit such as a microcontroller.
Microcontrollers, also referred to as microcontroller units (MCUs) or single-chip microcomputers, use an on-chip oscillator circuit to generate an internal clock signal. The oscillator circuit conventionally comprises an inverter, the input and output terminals of which are coupled together through a feedback resistor, causing the inverter to oscillate between the high and low output states. The input and output terminals are also coupled to external leads of the microcontroller package.
In a first mode of operation, these external leads are coupled to an external crystal resonator, which determines the oscillation frequency of the inverter. In a second mode of operation, an external clock signal is supplied to the external lead coupled to the input terminal of the inverter, and the inverter oscillates at the frequency of the external clock signal. The other external lead may be left open, or a complementary external clock signal created by an external inverter may be supplied to this external lead.
To drive the external crystal employed in the first mode, the oscillator's inverter requires a high output-drive capacity, but this capability has unwanted consequences when the second mode is employed. If the external lead coupled to the output terminal of the inverter is left open, the high output-drive capacity of the inverter causes this external lead to radiate an alternating electromagnetic field with sharp transitions between the high and low states. These sharp transitions can easily generate electromagnetic interference (EMI) in other circuits nearby.
If a complementary external clock signal is supplied to this external lead from an external inverter, differences between the switching characteristics of the oscillator's inverter and the external inverter may create momentary short-circuit conditions, in which the output of one inverter is high while the output of the other inverter is low. The high output-drive capacity of the oscillator's inverter can generate considerable current flow through the external lead during these moments, again creating electromagnetic interference, not to mention unwanted dissipation of current and power.
Current and power are also dissipated unnecessarily in the feedback resistor during the second mode of operation, regardless of how the external leads are connected.